package com.rong.raft.test;

import com.rong.raft.LeaderSelector;
import com.rong.raft.NodeState;

public class Node1 {
	public static void main(String[] args) {

		NodeState nodeState = new NodeState();
		nodeState.setCurrNodeAddress("127.0.0.1:8881");
		nodeState.setCurrTerm(0);
		nodeState.setSlefId("n0");
		nodeState.addNode("n0", "127.0.0.1:8881");
		nodeState.addNode("n1", "127.0.0.1:8882");
		nodeState.addNode("n2", "127.0.0.1:8883");

		LeaderSelector leaderSelector = new LeaderSelector(nodeState);
		leaderSelector.start();
	}
}
